package com.example.xpvideo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 本地生活板块配置 -自定义专区
 * @TableName ls_custom
 */
@TableName(value ="ls_custom")
@Data
public class LsCustom implements Serializable {
    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 名称
     */
    @NotBlank(message = "名称不能空")
    private String name;

    /**
     * 属于那个商圈
     */
    @NotNull(message = "请选择专区")
    private Integer parentId;

    /**
     * 热度
     */
    private Integer heat;

    /**
     * 图片
     */
    private String images;

    /**
     * 原价
     */
    @NotNull(message = "请填写原价")
    private BigDecimal primeCost;

    /**
     * 现价
     */
    @NotNull(message = "请填写现价")
    private BigDecimal goingPrice;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}